xen.git
18 years agoUpdate version string for 3.2.0-rc2
Keir Fraser [Wed, 19 Dec 2007 15:56:02 +0000 (15:56 +0000)]
Update version string for 3.2.0-rc2

18 years agodoc: Fix serial console command line.
Keir Fraser [Wed, 19 Dec 2007 15:53:56 +0000 (15:53 +0000)]
doc: Fix serial console command line.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agovmx: Do not set bit 1 of FEATURE_CONTROL MSR if SMX is not supported
Keir Fraser [Wed, 19 Dec 2007 15:51:01 +0000 (15:51 +0000)]
vmx: Do not set bit 1 of FEATURE_CONTROL MSR if SMX is not supported
by the CPU. Also generally beef up robustness of VMXON instruction.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agotools/examples/block better use of losetup -r
Keir Fraser [Wed, 19 Dec 2007 15:05:15 +0000 (15:05 +0000)]
tools/examples/block better use of losetup -r

Use losetup -r when the vbd is specified to be readonly, but only if
-r is supported (rather than always creating a writeable losetup
mapping if possible).

This was inspired by (but not derived from) a diff from the Fedora 8
patchset which uses -r iff the vbd is specified as readonly.  We need
to be cleverer upstream because not all systems have losetup -r.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agoFix serial output of carriage return when using high-bit stream muxing.
Keir Fraser [Wed, 19 Dec 2007 15:02:05 +0000 (15:02 +0000)]
Fix serial output of carriage return when using high-bit stream muxing.
Original patch by Dan Doucette.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoxend: Fix device duplicate check.
Keir Fraser [Wed, 19 Dec 2007 14:51:02 +0000 (14:51 +0000)]
xend: Fix device duplicate check.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
18 years agoxend: Fix PCI Device Configuration
Keir Fraser [Wed, 19 Dec 2007 14:50:37 +0000 (14:50 +0000)]
xend: Fix PCI Device Configuration

Xend doesn't correctly work after restart, when there is a domU which
owns a pci device (driver domain). This patch fixes the problem.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
18 years agoFix master/slave handling in xenconsoled and qemu
Keir Fraser [Wed, 19 Dec 2007 14:45:45 +0000 (14:45 +0000)]
Fix master/slave handling in xenconsoled and qemu

Fix a number of problems with the pty handling:

- make openpty() implementation work on Solaris
- set raw on the slave fd, not the master, as the master doesn't
  have a line discipline pushed on Solaris
- make sure we don't leak the slave fd returned from openpty()
- don't use the 'name' argument of openpty() as it's a security risk
- note behaviour of a zero read of the master on Solaris
- remove pointless tcget/setattr

Signed-off-by: John Levon <john.levon@sun.com>
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
18 years agoxend: Indicate a resume operation
Keir Fraser [Wed, 19 Dec 2007 14:45:04 +0000 (14:45 +0000)]
xend: Indicate a resume operation

Indicate that the domain is created as part of a resume operation
rather than a 'create'.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years agohvm: Some cleanups to vlapic emulation.
Keir Fraser [Wed, 19 Dec 2007 11:14:05 +0000 (11:14 +0000)]
hvm: Some cleanups to vlapic emulation.
Some of this was suggested by Dexuan Cui.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoShadow: tidy the virtual-TLB translation cache.
Keir Fraser [Wed, 19 Dec 2007 10:11:54 +0000 (10:11 +0000)]
Shadow: tidy the virtual-TLB translation cache.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
18 years agoShadow: Make gfn_t always an unsigned long. GFNs are passed around
Keir Fraser [Wed, 19 Dec 2007 10:10:37 +0000 (10:10 +0000)]
Shadow: Make gfn_t always an unsigned long.  GFNs are passed around
outside the shadow code, and although a 32-bit gfn_t is guaranteed to
hold all GFNs that can be found in a 32-bit pagetable, comparisons
with INVALID_GFN aren't safe when (-1UL) != (u32)(-1).
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
18 years agoxentrace: Ensure virq gets sent even if we exactly hit the half water mark.
Keir Fraser [Wed, 19 Dec 2007 09:51:35 +0000 (09:51 +0000)]
xentrace: Ensure virq gets sent even if we exactly hit the half water mark.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years ago[IA64] xenoprof: don't modify mPSR.pp. VTi case
Alex Williamson [Mon, 17 Dec 2007 16:56:12 +0000 (09:56 -0700)]
[IA64] xenoprof: don't modify mPSR.pp. VTi case

Don't modify mPSR.pp for xenoprof. VTi domain case
xenoprof manages mPSR.pp so that mPSR.pp shouldn't be modified.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] xenoprof: don't modify mPSR.pp. PV case
Alex Williamson [Mon, 17 Dec 2007 16:51:06 +0000 (09:51 -0700)]
[IA64] xenoprof: don't modify mPSR.pp. PV case

Don't change mPSR.pp for xenoprof for PV domain case.
xenoprof manages mPSR.pp so that mPSR.pp shouldn't be modified.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] xenoprof: various fix on linux-xen/perfmon.c
Alex Williamson [Mon, 17 Dec 2007 16:45:53 +0000 (09:45 -0700)]
[IA64] xenoprof: various fix on linux-xen/perfmon.c

Various fixes on xen/arch/ia64/linux-xen/perfmon.c
- Fix starting/stopping sampling.
  So far IPI is used. but psr.pp isn't preserved when nested interrupt case
  with VTi domain. Instead timer is used.
- Redefines ia64_set_pmc() to enable sampling of all xen VMM/guest
  kernel/guest user process.  It supports only generic pmc/pmd.
- Twist xenpfm_write_pmcs()
  It is also used when turning on pmcs. So bailing out when error is not
  appropriate. Even when error occures, it should continue to update next
  cpu's pmcs.
- Add gdprintk(XENLOG_DEUBG) and BUG_ON()s.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] xenoprof: fix xenoprof_handler()
Alex Williamson [Mon, 17 Dec 2007 16:38:54 +0000 (09:38 -0700)]
[IA64] xenoprof: fix xenoprof_handler()

- Use profile_pc() to get instruction pointer.
- Make xenoprof_handler() VTi domain aware
- Pass current to xenoprofile_get_mode() instead of task=NULL.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] xenoprof: make xenoprofile_get_mode() vti domain aware
Alex Williamson [Mon, 17 Dec 2007 16:36:46 +0000 (09:36 -0700)]
[IA64] xenoprof: make xenoprofile_get_mode() vti domain aware

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] xenoprof: fix xenoprof_shared_gmfn()
Alex Williamson [Mon, 17 Dec 2007 16:33:52 +0000 (09:33 -0700)]
[IA64] xenoprof: fix xenoprof_shared_gmfn()

fix panic after xenoprof shutdown as follows.
(XEN) Xen BUG at mm.c:1265
(XEN) FIXME: implement ia64 dump_execution_state()
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) Xen BUG at mm.c:1265
(XEN) ***************************************

The c/s 14624:64ab7d443549 changed the p2m table semantics so that
xenoprof_shared_gmfn() also needs catch it up.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years agoHVM: support unaligned and page-crossing writes in the shadow emulator
Keir Fraser [Sat, 15 Dec 2007 18:29:27 +0000 (18:29 +0000)]
HVM: support unaligned and page-crossing writes in the shadow emulator
so that we can use it to support guests that clear CR0.WP.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
18 years agoxend: Prevent XenD touching externally managed bridges
Keir Fraser [Sat, 15 Dec 2007 18:26:52 +0000 (18:26 +0000)]
xend: Prevent XenD touching externally managed bridges

With current XenD 3.0.4 or later try the following:

    brctl addbr demo
    ifconfig demo up

    /etc/init.d/xend start
    /etc/init.d/xend stop

    ifconfig demo down
    brctl delbr demo

Now, start XenD again....

    /etc/init.d/xend start

And watch in horror as it re-creates your 'demo' bridge.

The problem is that the 'XendNetwork' class does not distinguish
between bridge devices that it is managing (ie those created via
XenAPI) and those which it does not manage (ie those created by OS
distro init scripts, or by apps like  libvirt).

While initially I thought I could just make XenD ignore
externally-managed bridges completely, it seems to needs to know about
them otherwise it can't hook up guest VIFs to them correctly. So the
attached patch adds a 'managed' flag to the XendNetwork
class. Externally managed bridges have this set to False. At startup
XenD will now only re-create bridge devices which have the 'managed'
flag set to 'True'  - ie those created via XenAPI.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
18 years agox86: Fix e820 walk and allocator initialisation.
Keir Fraser [Sat, 15 Dec 2007 18:23:13 +0000 (18:23 +0000)]
x86: Fix e820 walk and allocator initialisation.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years ago[IA64] Fix vmx_asm_thash typo
Alex Williamson [Fri, 14 Dec 2007 17:26:06 +0000 (10:26 -0700)]
[IA64] Fix vmx_asm_thash typo

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
18 years ago[IA64] Fix vulnerability of copy_to_user in PAL emulation
Alex Williamson [Fri, 14 Dec 2007 17:25:03 +0000 (10:25 -0700)]
[IA64] Fix vulnerability of copy_to_user in PAL emulation

There is a security vulnerability in PAL emulation since alt-dtlb
miss handler of HVM absolutely inserts a identity-mapped TLB when
psr.vm=0.  HVM guest can access an arbitrary machine physical
memory with this security hole.  Actually windows 2008 destroys
the content of machine physical address 0x108000.

I think this patch is enough for normal usage.  Please see SDM
Vol2 11.10.2.1.3 "Making PAL Procedure Calls in Physical or
Virtual Mode".  If the caller has a responsibility of providing
DTR or DTC mapping, xencomm for PAL might be unnecessary.

I confirmed there is no problem in linux, windows 2003, windows
2008 with this patch.

As for PV domain, the same logic can't be used due to only one
vTLB. This patch only checks that the buffer never points VMM
address, that would avoid the vulnerability.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
18 years agomerge with xen-unstable.hg (staging)
Alex Williamson [Fri, 14 Dec 2007 17:12:40 +0000 (10:12 -0700)]
merge with xen-unstable.hg (staging)

18 years agoSVM: Treat the vlapic's tpr as the master copy and sync the vtpr to it
Keir Fraser [Fri, 14 Dec 2007 11:50:24 +0000 (11:50 +0000)]
SVM: Treat the vlapic's tpr as the master copy and sync the vtpr to it
before every vm entry.  This fixes HVM save/restore/migrate, as the
vtpr value was only being synced on guest TPR writes before.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
18 years agohvm: Remove duplicate assignment of __HYPERVISOR_grant_table_op in
Keir Fraser [Fri, 14 Dec 2007 11:39:02 +0000 (11:39 +0000)]
hvm: Remove duplicate assignment of __HYPERVISOR_grant_table_op in
hypercall demux tables.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agocpufreq: Always return successfully from cpufreq MSR traps
Keir Fraser [Fri, 14 Dec 2007 11:37:02 +0000 (11:37 +0000)]
cpufreq: Always return successfully from cpufreq MSR traps
Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agohvm: Remove guest-triggerable assertions from vlapic emulation.
Keir Fraser [Fri, 14 Dec 2007 10:48:18 +0000 (10:48 +0000)]
hvm: Remove guest-triggerable assertions from vlapic emulation.

Currently our VLAPIC will happily deliver interrupts on vectors <
16. This could be emulated better, but probably does not matter.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoxenoprof: Fix more than one events can't be sampled concurrently for Intel CPU with...
Keir Fraser [Fri, 14 Dec 2007 10:34:22 +0000 (10:34 +0000)]
xenoprof: Fix more than one events can't be sampled concurrently for Intel CPU with family equal to 6

The original code only sets EN bit of IA32_PERFEVTSEL0 when profiling
is started.

Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
18 years agoacm, xend: Serialize the execution of external scripts.
Keir Fraser [Fri, 14 Dec 2007 10:26:11 +0000 (10:26 +0000)]
acm, xend: Serialize the execution of external scripts.

Instead of starting a thread per script, run a single thread and send
orders to it. This serializes the execution of the scripts.

Signed-off-by: Stefan Berger <stefanB@us.ibm.com>
18 years agoxenoprof: flush remaining smples when sampling is stopped.
Keir Fraser [Fri, 14 Dec 2007 10:25:00 +0000 (10:25 +0000)]
xenoprof: flush remaining smples when sampling is stopped.

Xenoprof notifies guest kernel via VIRQ_XENOPROF when sampled.
But it does coarsly based on heuristic so that sometimes VIRQ_XENOPROF
isn't delivered resulting in that oprofile daemon collects no sample.
To avoid that situation, always send VIRQ_XENOPROF when sampling is
stopped.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years agodocs: Adds VT-d testing combinations and lists OS which VT-d works on.
Keir Fraser [Fri, 14 Dec 2007 10:22:08 +0000 (10:22 +0000)]
docs: Adds VT-d testing combinations and lists OS which VT-d works on.
Signed-off-by: Weidong Han <weidong.han@intel.com>
18 years agoxsm: Implement missing functions in XSM dummy module
Keir Fraser [Fri, 14 Dec 2007 10:17:50 +0000 (10:17 +0000)]
xsm: Implement missing functions in XSM dummy module

I am implementing some missing interface functions in the XSM dummy
module. Also deactivating some debugging output.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years agotools: Some fixes for 'make clean'.
Keir Fraser [Fri, 14 Dec 2007 10:16:52 +0000 (10:16 +0000)]
tools: Some fixes for 'make clean'.
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
18 years agoxenstore size limits
Keir Fraser [Fri, 14 Dec 2007 10:15:00 +0000 (10:15 +0000)]
xenstore size limits

 * Documents the existing 4kby size limit on xenstore message payloads
 * Causes xs.c in libxenstore to fail locally rather than violating
   said limit (which is good because xenstored kills the client
   connection if it's exceeded).
 * Introduces some limits on path lengths in xenstored.  I trust
   no-one is using path lengths >2kby.  This is good because currently
   a domain client can create a 4kby relative path that the dom0 tools
   cannot access since they'd have to specify the somewhat longer
   absolute path.
 * Removes uses of the host's PATH_MAX (!)

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agodocs/misc/xenstore.txt minor fixes
Keir Fraser [Fri, 14 Dec 2007 10:12:15 +0000 (10:12 +0000)]
docs/misc/xenstore.txt minor fixes
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years ago[IA64] Update README.xenia64
Alex Williamson [Thu, 13 Dec 2007 16:34:49 +0000 (09:34 -0700)]
[IA64] Update README.xenia64

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
18 years ago[IA64] Fix XenITP build
Alex Williamson [Thu, 13 Dec 2007 16:07:55 +0000 (09:07 -0700)]
[IA64] Fix XenITP build

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
18 years agoMerge with ia64 tree.
Keir Fraser [Thu, 13 Dec 2007 09:31:03 +0000 (09:31 +0000)]
Merge with ia64 tree.

18 years agohvm: Fix mistake in timer cleanup.
Keir Fraser [Thu, 13 Dec 2007 09:29:21 +0000 (09:29 +0000)]
hvm: Fix mistake in timer cleanup.
Spotted by Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agomerge with xen-unstable.hg (staging)
Alex Williamson [Wed, 12 Dec 2007 17:50:03 +0000 (10:50 -0700)]
merge with xen-unstable.hg (staging)

18 years ago[IA64] Fix TLB purge and reload for xen heap in MCA handler
Alex Williamson [Wed, 12 Dec 2007 17:47:54 +0000 (10:47 -0700)]
[IA64] Fix TLB purge and reload for xen heap in MCA handler

Xen might panic when the TLB related MCA occurred because Xen
virtual address space moved to 0xf400000004000000.

The following patch fixes it.

Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
18 years agohvm: Reduce vpt.c dependencies on external timer details.
Keir Fraser [Wed, 12 Dec 2007 15:41:20 +0000 (15:41 +0000)]
hvm: Reduce vpt.c dependencies on external timer details.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoioemu/qemu vga: save and restore vram buffer (take 2)
Keir Fraser [Wed, 12 Dec 2007 12:02:01 +0000 (12:02 +0000)]
ioemu/qemu vga: save and restore vram buffer (take 2)

The existing stdvga driver from xen-unstable tools/ioemu/hw/vga* does
not save the emulated VGA memory contents.  The symptoms include video
malfunction after restore, including black screen (which can often be
fixed by asking the guest to redraw) but also missing font setup etc.
The attached patch fixes this by saving the entire VGA memory buffer,
just like the Xen ioemu Cirrus emulator does.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agoRevert 16579:0884e0a5ecc33afac8d60ea09652cf436d1a33ce.
Keir Fraser [Wed, 12 Dec 2007 12:00:46 +0000 (12:00 +0000)]
Revert 16579:0884e0a5ecc33afac8d60ea09652cf436d1a33ce.

18 years agoRevert a chunk of the gdbstub fixup patch.
Keir Fraser [Wed, 12 Dec 2007 11:42:06 +0000 (11:42 +0000)]
Revert a chunk of the gdbstub fixup patch.

No need to dump register state when we are bailing into a debugger.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoFix gdb debugging of hypervisor.
Keir Fraser [Wed, 12 Dec 2007 11:27:15 +0000 (11:27 +0000)]
Fix gdb debugging of hypervisor.

This patch:
  * enables the gdbstubs to properly access hypervisor memory;
  * prevents an assertion failure in __spurious_page_fault's call
    to map_domain_page if such accesses fail, by testing in_irq();
  * prints some additional helpful messages;
  * fixes the endianness of register transfers from the gdbstubs
    so that gdb is much less confused.
  * fixes the documentation in docs/misc/crashdb.txt

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agohvm: Fix destroy_periodic_time() to not race destruction of one-shot timers.
Keir Fraser [Wed, 12 Dec 2007 11:08:21 +0000 (11:08 +0000)]
hvm: Fix destroy_periodic_time() to not race destruction of one-shot timers.

This bug was tracked down by Dexuan Cui <dexuan.cui@intel.com>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agohvm: Fix is_isa_irq_masked().
Keir Fraser [Wed, 12 Dec 2007 10:40:02 +0000 (10:40 +0000)]
hvm: Fix is_isa_irq_masked().

Incorrectly it was not checking whether the vlapic is masking the pic.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
18 years agoFix build after I removed test_assign_device from domctl union.
Keir Fraser [Wed, 12 Dec 2007 10:38:14 +0000 (10:38 +0000)]
Fix build after I removed test_assign_device from domctl union.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agovt-d: Test device assignability in xend, but defer actual assignment to qemu-dm.
Keir Fraser [Wed, 12 Dec 2007 10:29:35 +0000 (10:29 +0000)]
vt-d: Test device assignability in xend, but defer actual assignment to qemu-dm.
Signed-off-by: Weidong Han <weidong.han@intel.com>
18 years agohvm: MTRR MSRs save/restore support.
Keir Fraser [Wed, 12 Dec 2007 10:25:18 +0000 (10:25 +0000)]
hvm: MTRR MSRs save/restore support.
Signed-off-by: Disheng Su <disheng.su@intel.com>
18 years agovt-d: Clean up hypervisor logging.
Keir Fraser [Wed, 12 Dec 2007 10:22:39 +0000 (10:22 +0000)]
vt-d: Clean up hypervisor logging.
Signed-off-by: Weidong Han <weidong.han@intel.com>
18 years agodocs: vtd.txt doc change
Keir Fraser [Wed, 12 Dec 2007 10:19:44 +0000 (10:19 +0000)]
docs: vtd.txt doc change

Added a note on conventional PCI device passthrough.

Signed-off-by: Allen Kay <allen.m.kay@intel.com>
18 years agoia64, xend: Close nvram file when rebooting HVM domain
Keir Fraser [Wed, 12 Dec 2007 10:08:54 +0000 (10:08 +0000)]
ia64, xend: Close nvram file when rebooting HVM domain
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
18 years agoxend: Fix cleanup_domains() for suspending managed domains
Keir Fraser [Wed, 12 Dec 2007 10:08:14 +0000 (10:08 +0000)]
xend: Fix cleanup_domains() for suspending managed domains

When unmanaged domains with on_xend_stop="suspend" exist, managed
domains are not suspended by xend stop command.  The processing of
cleanup_domains() is aborted by exception. This patch keeps suspending
managed domains even if unmanaged domains exist.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
18 years agotools: Fix distutils installation of xsview.
Keir Fraser [Wed, 12 Dec 2007 10:05:53 +0000 (10:05 +0000)]
tools: Fix distutils installation of xsview.

Distutils won't install xsview unless it has an __init__.py.  This
patch adds an empty one, which is all that is required.

Signed-off-by: Mark Williamson <mark.williamson@cl.cam.ac.uk>
18 years agotools: Use os.system instead of exec to start xentop.
Keir Fraser [Wed, 12 Dec 2007 10:04:29 +0000 (10:04 +0000)]
tools: Use os.system instead of exec to start xentop.

This makes no difference to the visible behaviour of "xm top" but
avoids the whole of xm from quitting if you're in "xm shell".  This
provides the more intuitive behaviour of returning to the xm shell
interface after leaving xm top.

Signed-off-by: Mark Williamson <mark.williamson@cl.cam.ac.uk>
18 years agotools: Remove references to USB paravirt driver. Doesn't affect qemu usb args.
Keir Fraser [Wed, 12 Dec 2007 10:03:32 +0000 (10:03 +0000)]
tools: Remove references to USB paravirt driver.  Doesn't affect qemu usb args.

Some relics in the control tools still refer to the USB paravirt
driver.  Remove this as it's dead code and is in the history for
anyone really interested. The Qemu device model has its own USB
configuration, which should still work.

Signed-off-by: Mark Williamson <mark.williamson@cl.cam.ac.uk>
18 years agoAdd missing file from previous changeset.
Keir Fraser [Wed, 12 Dec 2007 10:03:09 +0000 (10:03 +0000)]
Add missing file from previous changeset.

18 years agodocs: Adjust revision number in Xen-API document and introduce revision history.
Keir Fraser [Wed, 12 Dec 2007 09:59:53 +0000 (09:59 +0000)]
docs: Adjust revision number in Xen-API document and introduce revision history.

This patch adjusts the revision number to 1.0.1 and date in the
Xen-API document and introduces a revision history with entries for
1.0.0 and 1.0.1.

Signed-off-by: Stefan Berger <stefanB@us.ibm.com>
18 years agoxend, acm: Extend Xen-API with function to reset the policy
Keir Fraser [Wed, 12 Dec 2007 09:57:55 +0000 (09:57 +0000)]
xend, acm: Extend Xen-API with function to reset the policy
This patch extends the Xen-API and the legacy XML-RPC interface with a
function to reset the policy on the system (through an update with the
default policy). I adapted the code in 'xm resetpolicy' to use this
now.

This patch also extends libxen and the documentation to reflect the
new function.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years agoFix domctl GCC dependency
Keir Fraser [Wed, 12 Dec 2007 09:54:21 +0000 (09:54 +0000)]
Fix domctl GCC dependency

Compilers other than GCC don't allow zero-sized structs.

Signed-off-by: John Levon <john.levon@sun.com>
18 years agoioemu/qemu vga: save and restore vram buffer
Keir Fraser [Wed, 12 Dec 2007 09:53:00 +0000 (09:53 +0000)]
ioemu/qemu vga: save and restore vram buffer

The existing stdvga driver from xen-unstable tools/ioemu/hw/vga* does
not save the emulated VGA memory contents.  The symptoms include video
malfunction after restore, including black screen (which can often be
fixed by asking the guest to redraw) but also missing font setup etc.
The attached patch fixes this by saving the entire VGA memory buffer,
just like the Xen ioemu Cirrus emulator does.

I have reinterpreted the `is_vbe' byte, which is related to
CONFIG_BOCHS_VBE, as a general flags word.  This enables my code to
allow old images to be restored (albeit with loss of VGA memory), by
using another bit in that word to indicate whether the VGA memory dump
is present.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years ago[IA64] Stop all cpus at panic
Alex Williamson [Tue, 11 Dec 2007 17:22:37 +0000 (10:22 -0700)]
[IA64] Stop all cpus at panic

Current panic() of hypervisor doesn't stop all cpus.
So domains can work after hypervisor panic (when using
noreboot option).  If dom0 continues to work after
xen panic, the system may get into serious problems.

This patch fixes the issue.

I chose cpu_halt() to stop other cpus by smp_send_stop().
I think it should work fine for kexec.  machine_halt()
is only spinloop for leaving the panic calltrace.

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
18 years ago[IA64] Fix LOAD_PHYSICAL for INIT handler
Alex Williamson [Tue, 11 Dec 2007 17:14:11 +0000 (10:14 -0700)]
[IA64] Fix LOAD_PHYSICAL for INIT handler

Xen virtual address space moves to 0xf400000004000000.
So LOAD_PHYSICAL is broken. I fixed LOAD_PHYSICAL with ia64 patch.
This patch also fixes INIT handler.

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
18 years agoioemu: Include mouse dz in xenfb event packet
Keir Fraser [Mon, 10 Dec 2007 13:49:22 +0000 (13:49 +0000)]
ioemu: Include mouse dz in xenfb event packet

Needed for mouse wheel support in a PV guest.

Signed-off-by: Pat Campbell <plc@novell.com>
18 years agoxm-test: Don't run security test if ACM is not enabled.
Keir Fraser [Mon, 10 Dec 2007 12:02:46 +0000 (12:02 +0000)]
xm-test: Don't run security test if ACM is not enabled.

I forgot to put in the check to prevent this test case from running
when ACM is not compiled into Xen. I am resetting the policy so that
an update with the prepared policy can be done without changing that
policy's header to match the current policy's version.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years agox86: avoid LOCK prefix in some cases where it's not necessary.
Keir Fraser [Mon, 10 Dec 2007 11:55:55 +0000 (11:55 +0000)]
x86: avoid LOCK prefix in some cases where it's not necessary.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agox86: eliminate (unused) return value from exception handling routines
Keir Fraser [Mon, 10 Dec 2007 11:49:12 +0000 (11:49 +0000)]
x86: eliminate (unused) return value from exception handling routines
Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agoAvoid duplication of domainID in messages.
Keir Fraser [Mon, 10 Dec 2007 11:41:40 +0000 (11:41 +0000)]
Avoid duplication of domainID in messages.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agoinit_heap_pages() can be static.
Keir Fraser [Mon, 10 Dec 2007 11:37:13 +0000 (11:37 +0000)]
init_heap_pages() can be static.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agox86: Clean up boot/wakeup code.
Keir Fraser [Mon, 10 Dec 2007 11:34:02 +0000 (11:34 +0000)]
x86: Clean up boot/wakeup code.

 * Generalise wakeup stack to general 'early stack' used everywhere.
 * Ensure things that must be aligned are aligned.
 * Remove some unused symbols.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoFix XEN_EXTRAVERSION and shorten so it fits on a single line after
Keir Fraser [Sat, 8 Dec 2007 17:35:32 +0000 (17:35 +0000)]
Fix XEN_EXTRAVERSION and shorten so it fits on a single line after
figlet-isation: 3.2.0-rc2-pre.

18 years agoRevert 16560:822d4ec5cfb1.
Keir Fraser [Sat, 8 Dec 2007 17:32:01 +0000 (17:32 +0000)]
Revert 16560:822d4ec5cfb1.

Preference seems to be to update library versions only when the ABI
changes. Only libxenctrl/libxenguest have their version number changed
to 3.2.0, as a reminder that they change on pretty much every major
release.

libfsimage/libxenstore/libblktap have not changed substantially
recently, hence the ABI has not changed, and version number stays the
same as in Xen 3.1 (and before).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoStart development for 3.2.0-rc2.
Keir Fraser [Sat, 8 Dec 2007 17:27:10 +0000 (17:27 +0000)]
Start development for 3.2.0-rc2.

18 years agoAdded tag 3.2.0-rc1 for changeset 1f0c6e0d74a4
Keir Fraser [Sat, 8 Dec 2007 17:00:11 +0000 (17:00 +0000)]
Added tag 3.2.0-rc1 for changeset 1f0c6e0d74a4

18 years agoUpdate Xen version to 3.2.0-rc1
Keir Fraser [Sat, 8 Dec 2007 16:59:49 +0000 (16:59 +0000)]
Update Xen version to 3.2.0-rc1

18 years agohvm stdvga: Do not emulate PIO reads inside Xen. They should be rare
Keir Fraser [Sat, 8 Dec 2007 16:57:13 +0000 (16:57 +0000)]
hvm stdvga: Do not emulate PIO reads inside Xen. They should be rare
(PIO write emulation is really for book-keeping to detect when we
enter/leave stdvga mode, and to work out what to do with mmio
accesses), and we may do the wrong thing depending on emulated SVGA
hardware and current mode.

This simplifies the code and means that 'stdvga=1' once again works
properly and causes the stdvga bios to be loaded by hvmloader.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoxm-test, acm: fixes an API call due to recent changes.
Keir Fraser [Sat, 8 Dec 2007 15:47:31 +0000 (15:47 +0000)]
xm-test, acm: fixes an API call due to recent changes.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years agoqemu 16550 uart: Fast-drop bursts of transmitted characters to avoid
Keir Fraser [Sat, 8 Dec 2007 15:46:04 +0000 (15:46 +0000)]
qemu 16550 uart: Fast-drop bursts of transmitted characters to avoid
stalling due to a disconnected pipe or pty.
Signed-off-by: Trolle Selander <trolle.selander@gmail.com>
18 years agox86: Respect e820 map even below 16MB.
Keir Fraser [Fri, 7 Dec 2007 18:24:33 +0000 (18:24 +0000)]
x86: Respect e820 map even below 16MB.

NB. Even with this patch, x86/32 still statically allocates the range
1MB-12MB. This can be changed if there really are platforms that need
stuff to persist in that range after the OS starts to boot.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86: Change proliant io emulation stub to use pushf/popf instead of pushfw/popfw.
Keir Fraser [Fri, 7 Dec 2007 17:05:15 +0000 (17:05 +0000)]
x86: Change proliant io emulation stub to use pushf/popf instead of pushfw/popfw.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agovmx realmode: Fix exception delivery w.r.t. in-flight I/O.
Keir Fraser [Fri, 7 Dec 2007 16:39:15 +0000 (16:39 +0000)]
vmx realmode: Fix exception delivery w.r.t. in-flight I/O.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agotools: Rationalise library soname versions.
Keir Fraser [Fri, 7 Dec 2007 14:44:13 +0000 (14:44 +0000)]
tools: Rationalise library soname versions.

 * Arrange for the sonames of libxenstore, libxc, libfsimage and
   libblktap to be set from a single place in Config.mk.
 * Bumps the soname major version number to 3.2 in preparation for
   3.2 rc1 after which we do not expect to have ABI changes.

I have not done anything about libaio and libflask.  The former is
imported from elsewhere and if we're lucky will have sane versioning
upstream.

libflask has a very small interface and I'm hoping that the XSM
authors have been keeping some ABI discipline.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agohvm: Clean up AP initialisation. This allows AP bringup into emulated
Keir Fraser [Fri, 7 Dec 2007 14:28:07 +0000 (14:28 +0000)]
hvm: Clean up AP initialisation. This allows AP bringup into emulated
real mode when running on VMX, as well as removing 100 LOC.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoioemu: Include termios.h and sys/ioctl.h to get TIOCM_* definitions.
Keir Fraser [Fri, 7 Dec 2007 12:48:36 +0000 (12:48 +0000)]
ioemu: Include termios.h and sys/ioctl.h to get TIOCM_* definitions.
This is preferable to hard-coding them in the ioemu source file, or
including a Linux-specific header.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoxm: Fix help messages of xm vcpu-list/uptime
Keir Fraser [Fri, 7 Dec 2007 12:44:27 +0000 (12:44 +0000)]
xm: Fix help messages of xm vcpu-list/uptime

We can give multiple domains to the following commands.
But, the help messages of the commands are explained to be able
to give a single domain.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
18 years ago[IOEMU] Correct hu keymap definitions
Keir Fraser [Fri, 7 Dec 2007 12:43:06 +0000 (12:43 +0000)]
[IOEMU] Correct hu keymap definitions

Signed-off-by: Pat Campbell <plc@novell.com>
18 years ago[IOEMU] Add latin2 key symbol definitions.
Keir Fraser [Fri, 7 Dec 2007 12:42:24 +0000 (12:42 +0000)]
[IOEMU] Add latin2 key symbol definitions.

Allows Hungarian users plus others to enter their language specific
accented characters.

Signed-off-by: Pat Campbell <plc@novell.com>
18 years agoFix ioemu compile: serial.c was including a Linux-specific header.
Keir Fraser [Fri, 7 Dec 2007 00:41:54 +0000 (00:41 +0000)]
Fix ioemu compile: serial.c was including a Linux-specific header.
Signed-off-by: John Levon <john.levon@sun.com>
18 years agox86: Remove bogus variables on construct_dom0()
Keir Fraser [Thu, 6 Dec 2007 17:47:53 +0000 (17:47 +0000)]
x86: Remove bogus variables on construct_dom0()

The check for supervisor_mode_kernel feature bit was being done on the
dom0_features_{supported,required} variables, but they are always set
to zero.

The feature bits are stored on elf_dom_parms struct, not on those
variables.

From: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoia64: Fix build after buf_ioreq struct change.
Keir Fraser [Thu, 6 Dec 2007 17:10:26 +0000 (17:10 +0000)]
ia64: Fix build after buf_ioreq struct change.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
18 years agolibxc: Interface has changed a bit since Xen 3.1, so bump the major
Keir Fraser [Thu, 6 Dec 2007 15:36:07 +0000 (15:36 +0000)]
libxc: Interface has changed a bit since Xen 3.1, so bump the major
number.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agohvm: buffered_ioreq does not need a 'df' field. Add explicit bitfield
Keir Fraser [Thu, 6 Dec 2007 15:17:48 +0000 (15:17 +0000)]
hvm: buffered_ioreq does not need a 'df' field. Add explicit bitfield
padding to ioreq and buf_ioreq structs.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years ago32-on-64: Fixes to previous changeset.
Keir Fraser [Thu, 6 Dec 2007 13:56:00 +0000 (13:56 +0000)]
32-on-64: Fixes to previous changeset.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years ago32-on-64: Fix domain address-size clamping, implement
Keir Fraser [Thu, 6 Dec 2007 13:39:19 +0000 (13:39 +0000)]
32-on-64: Fix domain address-size clamping, implement
copy-on-grant-transfer, and eliminate 166GB memory limit for x86/64
Xen.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoACM: Recover if XML policy representation is missing.
Keir Fraser [Thu, 6 Dec 2007 12:13:12 +0000 (12:13 +0000)]
ACM: Recover if XML policy representation is missing.

Recover the system if the XML representation of the currently loaded
policy is missing. Force the installation of the DEFAULT policy.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years agoxm-test: An additional ACM security test case for the test suite.
Keir Fraser [Thu, 6 Dec 2007 12:12:29 +0000 (12:12 +0000)]
xm-test: An additional ACM security test case for the test suite.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>